package tech.yangzhijie.basic.knowledge.basic;

import java.util.HashMap;

public class OverrideTest {
    public static void main(String[] args) {
        OverrideSuper overrideSuper = new OverrideChild();
        OverrideChild overrideChild = new OverrideChild();
        overrideSuper.test("1","2");
        overrideSuper.test01();
        overrideSuper.test02();
        overrideChild.test01();
        overrideChild.test02();
    }
}

abstract class OverrideSuper{

    public abstract void test(final String str1,final String str2);

    public static void test01(){
        System.out.println("super test01");
    }

    public synchronized void test02(){
        System.out.println("super test02");
    }
}

class OverrideChild extends OverrideSuper{

    @Override
    public void test(String str1,String str2) {
        System.out.println(str1 + " - " + str2);
    }

    public static void test01(){
        System.out.println("child test01");
    }

    public void test02(){
        System.out.println("child test02");
    }
}
